package HLLib.platform;

import HLCode.HLClass;
import HLCode.HLClassManager;
import HLCode.HLClassManager_H;
import HLCode.HLLibObject;
import HLLib.base.HLICallback;
import HLLib.base.HLList;
import HLLib.base.HLString;

public class HL91Platform extends HLLibObject implements HLICallback{
    public HLClass GetClass(HLClassManager classManager) {
        return classManager.GetLibClass(HLClassManager_H.CLASS_GROUP_TYPE_LIB_PLATFORM, HLClassManager_H.LIB_CLASS_PLATFORM_91Platform);
    }

	//
	static HL91Platform _platform = null;

	public HL91Platform() {

	}

	public static HL91Platform sharePlatform() {
		if (_platform == null) {
			_platform = new HL91Platform();
		}
		return _platform;
	}

	public void CheckVersion() {
		curRun.CallbackSuccess(CALLBACK_91_NO_NEW_VERSION, null);
	}

	public void Login() {
		HL91Player player = new HL91Player();
		curRun.CallbackSuccess(CALLBACK_91_LOGIN_SUCESS, player);
	}

	public void LoginEX() {
		HL91Player player = new HL91Player();
		curRun.CallbackSuccess(CALLBACK_91_LOGIN_SUCESS, player);
	}

	public void Logout() {
	}

	public void GuestRegist() {
	}

	public boolean IsLogined() {
		return true;
	}

	private boolean GetCurrentLoginState() {
		return true;
	}

	public void SwitchAccount() {
	}

	public void EnterAccountManage() {
	}

	public void EnterPlatform() {
	}

	public HLString Buy(HLString des) {
		return new HLString("uuiduuiduuiduuiduuiduuiduuiduuid");
	}
	public void  BuyAysn (HL91PayInfo payInfo){
		curRun.CallbackSuccess(CALLBACK_91_BUY_SUCESS, payInfo);
	}
	public void GetProducts(){
		HLList products = new HLList();
		HL91Product pd = new HL91Product();
		curRun.CallbackSuccess(CALLBACK_91_GET_PRODUCTS_SUCESS, pd);
		
	}
}
